/*
 * @Author: Eureka 
 * @Date: 2020-09-03 17:28:38 
 * @Last Modified by: Eureka
 * @Last Modified time: 2021-05-07 17:01:27
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///设置EdgeInsets
EdgeInsets setEdgeInsets(
    {var left = 0.0, var top = 0.0, var right = 0.0, var bottom = 0.0}) {
  return EdgeInsets.only(
    left: ScreenUtil().setWidth(left.toDouble()),
    top: ScreenUtil().setHeight(top.toDouble()),
    right: ScreenUtil().setWidth(right.toDouble()),
    bottom: ScreenUtil().setHeight(bottom.toDouble()),
  );
}

///设置EdgeInsets
EdgeInsets setSymEdgeInsets({var horizontal = 0.0, var vertical = 0.0}) {
  return EdgeInsets.symmetric(
      horizontal: ScreenUtil().setWidth(horizontal.toDouble()),
      vertical: ScreenUtil().setHeight(vertical.toDouble()));
}

///设置EdgeInsets
EdgeInsets setAllEdgeInsets({var all = 0.0}) {
  return EdgeInsets.all(ScreenUtil().setWidth(all.toDouble()));
}
